<?php

namespace home\controller;

use home\model\TargetModel;

class TargetController extends Controller{

    private $target;

    public function __construct(){
        $this->target = new TargetModel();
    }
    /**     
     *  获取指定博客 id 的标签
     */
    public function getTargetJson($params){
        $data = $this->target->getTarget($params);
        return json_encode($data);
    }
    /**
     * 获取热门标签
     */
    public function queryTargetJson(){
        $data = $this->target->queryTarget($params);
        return json_encode($data);
    }
    // /**
    //  * 查询所有有这个标签的所有博客
    //  */
    // public function queryTargetBlog($params){
    //     $data = $this->target->queryTargetBlog($params);
    //     return json_encode($data);
    // }
    
}